import time
from selenium import webdriver
from selenium.webdriver.common.by import By

driver = webdriver.Chrome()
driver.get('https://www.baidu.com')
time.sleep(1)
#name
print(driver.name)
# currenturl
print(driver.current_url)
#pagesource
print(driver.page_source)
#title
print(driver.title)
#句柄
print(driver.current_window_handle)
#所有句柄 返回的是list
print(driver.window_handles)
#返回
driver.back()
#前进
driver.forward()
#刷新
driver.refresh()
#关闭当前操作页面
driver.close()
#关闭所有页面，退出驱动
driver.quit()

